import { Post, Get, Patch, Put, Delete, Download, ax } from './http';
import { type } from './interface';
import qs from 'qs';
export namespace User {
    /**
     * 获取账户列表
     */
    export var GetList = (query: type.user_GetListReq): Promise<type.Int64UserListTuple> => {
        return Get(`/api/User/GetList?${qs.stringify(query)}`, {});
    };
    /**
     * 登录
     */
    export var Login = (body: type.LoginReq): Promise<type.User> => {
        return Post(`/api/User/Login`, body);
    };
    /**
     * 新增账户
     */
    export var Insert = (body: type.User): Promise<any> => {
        return Post(`/api/User/Insert`, body);
    };
    /**
     * 编辑账户
     */
    export var Update = (body: type.User): Promise<any> => {
        return Post(`/api/User/Update`, body);
    };
    /**
     * 修改权限树
     */
    export var EditPermissionTree = (body: Array<type.Permission>): Promise<any> => {
        return Post(`/api/User/EditPermissionTree`, body);
    };
    /**
     * 获取权限树
     */
    export var GetPermissionTree = (): Promise<Array<type.Permission>> => {
        return Get(`/api/User/GetPermissionTree`, {});
    };
    /**
     * 修改账户权限
     */
    export var EditPermissions = (body: type.EditPermissionsReq): Promise<any> => {
        return Post(`/api/User/EditPermissions`, body);
    };
    /**
     * 短信设置
     */
    export var SetSmsConfig = (body: type.SetSmsConfigReq): Promise<any> => {
        return Post(`/api/User/SetSmsConfig`, body);
    };
    /**
     * 获取短信设置
     */
    export var GetSmsConfig = (query: type.user_GetSmsConfigReq): Promise<type.SetSmsConfigReq> => {
        return Get(`/api/User/GetSmsConfig?${qs.stringify(query)}`, {});
    };
}
